
<?php 
$comments = View::get('comments'); 
$pager = View::get('pager');

?>

<div class="clear"></div>
<div class="round">
    <div class="round-head">
                <h2>Lista komentarzy</h2>               
        </div>


        <div class="round-content">

                <div class="hidden filter-boxes">

                        <form>

                                <div class="filter-item">
                                        <label>Name</label>
                                        <input type="text" />
                                </div>

                                <div class="filter-item">
                                        <label>Type</label>
                                        <select multiple="multiple"><option>All records</option><option>Only publicated</option><option>Only deleted</option></select>
                                </div>

                                <div class="filter-item">
                                        <label>Publication date</label>
                                        From: <input class="date-input" type="text" />
                                        To: <input class="date-input" type="text" />
                                </div>

                                <div class="cl">
                                        <input type="button" class="btn filter-send" value="Filter results" /> <a class="filter-reset-button" href="" title="Reset filters">Reset filters</a> | <a class="filter-button" href="" title="Hide filters">Hide filters</a>
                                </div>

                        </form>

                </div>

                <table class="table-a" summary="Table">
                        <thead>
                                <tr>
                                        <th scope="col" class="chb"><input class="chall" type="checkbox" /></th>
                                        <th scope="col">ID</th>
                                        <th scope="col">Tytuł</th>
                                        <th scope="col">Data utworzenia</th>
                                        <th scope="col">Status</th>                                      
                                        <th scope="col" style="width: 65px;">Options</th>
                                </tr>
                        </thead>
                        
                        <tbody>
                            <?php foreach ($comments as $d): ?>
                                <tr>
                                        <td><input type="checkbox" /></td>
                                        <td><?php echo $d['id']; ?></td>
                                        <td><?php echo $d['content']; ?></td>
                                        <td><?php echo $d['date']; ?></td>
                                        <td><?php echo $d['is_active'] ? "Aktywny" : "OFF"; ?></td>
                                   
                                     
                                        <td>
                                                <a href="index.php?controller=demot&action=activate_comment&id=<?php echo $d['id']; ?>" class="table-icon edit" title="Akceptuj"></a>
                                                <a href="index.php?controller=demot&action=delete_comment&id=<?php echo $d['id']; ?>" class="table-icon delete" title="Kasuj"></a>
                     
                                        </td>
                                </tr>
                            <?php endforeach; ?>
                                
                        </tbody>
                </table>

                           
           
                <div class="tab-summary">


                        <div class="pagination">
                                <div class="resultsInfo">
                                    <div style="text-align: center;">
                                        <?php echo $pager->Render(true); ?>
                                    </div>
                                   
                                </div>

                        </div>

                        <div class="closePagination"></div>

                </div>
              

        </div>

</div>